<template>
  <div class="view-container">
    <overview @changeChartType="changeChartType"></overview>
    <line-chart :chartType="chartType"></line-chart>
  </div>
</template>

<script>
import { deepClone } from '@/utils'
import Overview from './overview'
import LineChart from './line-chart'
export default {
  name: 'Dashboard',
  components: { Overview, LineChart },
  data() {
    return {
      chartType: 'users'
    }
  },
  methods: {
    changeChartType(type) {
      this.chartType = type
    }
  },
  created() {
    const obj = deepClone([{ id: 1, name: 'su' }])
    console.log(obj)
  }
}
</script>

<style lang="stylus" scoped>
.svg-icon
  width 1em
  height 1em
  vertical-align -0.15em
  fill currentColor
  overflow hidden
</style>
